package asteroids.model.programs.statements;

import asteroids.model.programs.expressions.Expression;

public class If extends Statement {

	public If(int line, int column, Expression condition, Statement then, Statement otherwise) {
		super(line, column);
		this.condition = condition;
		this.then = then;
		this.otherwise = otherwise;
	}

	@Override
	public void accept(StatementRunner sv) {
		sv.run(this);
	}
	
	public Expression getCondition() {
		return condition;
	}

	public Statement getThen() {
		return then;
	}

	public Statement getOtherwise() {
		return otherwise;
	}

	private final Expression condition;
	
	private final Statement then;
	
	private final Statement otherwise;

}
